import Layout from '@/layout'

const rightsRouter = {
  path: '/rights',
  component: Layout,
  redirect: '/rights/list',
  name: 'rights',
  alwaysShow: true,
  meta: { title: '权限管理', icon: 'rights', permission: ['rights_103_01']
  },
  children: [
    {
      path: 'list',
      component: () => import('@/views/rights/list'),
      name: 'rights_list',
      meta: {
        title: '权限列表',
        permission: ['rights_112_02']
      }
    },
    {
      path: 'roles',
      component: () => import('@/views/rights/roles'),
      name: 'rights_list',
      meta: {
        title: '角色列表',
        permission: ['roles_111_02']
      }
    },
    {
      path: 'role_rights/:roleId',
      component: () => import('@/views/rights/permission'),
      name: 'role_rights',
      hidden: true,
      meta: {
        title: '角色权限',
        activeMenu: '/rights/roles',
        permission: ['roles_134_03']
      }
    }
  ]
}

export default rightsRouter
